package com.wyt.design.designmodel.strategy;

/**
 * @author weiyatong
 * @version 1.0
 * @date 2021/6/27 下午7:18
 * @describe
 */
public class main {
    public static void main(String[] args) {
        Duck duck = new MallardDuck();
        duck.prevoidFly();
        duck.setFlyBehavior(new FlyNoWay());  //中途改变鸭子类型，让其具有灵活性
        duck.prevoidFly();
    }
}
